<?php

namespace App\Admin\Controller;

class Base extends \Controller {

    protected $authed_uid;

    protected $authed_user;

    public function init() {
        
        \Auth::checkAuthed(MODULE_NAME);

        if ($this->authed_uid = $uid = \Auth::getAuthedUid(MODULE_NAME)) {

            $this->authed_user = $user = QF()->Admin()->get($uid);

            $this->assign([
                'authed_uid' => $uid,
                'authed_user' => $user,
            ]);
        }
    }

}
